package persistence;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Set;


/**
 * The persistent class for the Firm database table.
 * 
 */
@Entity
public class Firm implements Serializable {
	private static final long serialVersionUID = 1L;
	private FirmPK id;
	private String address;
	private String adress2;
	private String clients;
	private Timestamp created;
	private String employees;
	private byte engOth;
	private String fax;
	private String legName;
	private String legState;
	private Timestamp modified;
	private String organization;
	private String phone;
	private byte prim;
	private String primName;
	private byte prvFund;
	private String sec;
	private byte secPort;
	private byte selOth;
	private String solicit;
	private String website;
	private String zipcode;
	private String compensation;
	private Set<Clients_has_Firm> clientsHasFirms;
	private Set<Activity> activities;
	private Set<Filling> fillings;
	private Firm_Address firmAddress;
	private Set<Firm_has_Account> firmHasAccounts;
	private Set<Firm_has_Address> firmHasAddresses;
	private Set<Firm_has_Assest> firmHasAssests;
	private Set<Firm_has_Employee> firmHasEmployees;
	private Set<Firm_has_Owner> firmHasOwners;
	private Set<Service> services;
	private Set<Email> emails;
	private Set<Wrap> wraps;
	private Custodial custodial;

    public Firm() {
    }


	@EmbeddedId
	public FirmPK getId() {
		return this.id;
	}

	public void setId(FirmPK id) {
		this.id = id;
	}
	

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}


	public String getAdress2() {
		return this.adress2;
	}

	public void setAdress2(String adress2) {
		this.adress2 = adress2;
	}


	public String getClients() {
		return this.clients;
	}

	public void setClients(String clients) {
		this.clients = clients;
	}


	public Timestamp getCreated() {
		return this.created;
	}

	public void setCreated(Timestamp created) {
		this.created = created;
	}


	public String getEmployees() {
		return this.employees;
	}

	public void setEmployees(String employees) {
		this.employees = employees;
	}


	public byte getEngOth() {
		return this.engOth;
	}

	public void setEngOth(byte engOth) {
		this.engOth = engOth;
	}


	public String getFax() {
		return this.fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}


	public String getLegName() {
		return this.legName;
	}

	public void setLegName(String legName) {
		this.legName = legName;
	}


	public String getLegState() {
		return this.legState;
	}

	public void setLegState(String legState) {
		this.legState = legState;
	}


	public Timestamp getModified() {
		return this.modified;
	}

	public void setModified(Timestamp modified) {
		this.modified = modified;
	}


	public String getOrganization() {
		return this.organization;
	}

	public void setOrganization(String organization) {
		this.organization = organization;
	}


	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}


	public byte getPrim() {
		return this.prim;
	}

	public void setPrim(byte prim) {
		this.prim = prim;
	}


	public String getPrimName() {
		return this.primName;
	}

	public void setPrimName(String primName) {
		this.primName = primName;
	}


	public byte getPrvFund() {
		return this.prvFund;
	}

	public void setPrvFund(byte prvFund) {
		this.prvFund = prvFund;
	}


	public String getSec() {
		return this.sec;
	}

	public void setSec(String sec) {
		this.sec = sec;
	}


	public byte getSecPort() {
		return this.secPort;
	}

	public void setSecPort(byte secPort) {
		this.secPort = secPort;
	}


	public byte getSelOth() {
		return this.selOth;
	}

	public void setSelOth(byte selOth) {
		this.selOth = selOth;
	}


	public String getSolicit() {
		return this.solicit;
	}

	public void setSolicit(String solicit) {
		this.solicit = solicit;
	}


	public String getWebsite() {
		return this.website;
	}

	public void setWebsite(String website) {
		this.website = website;
	}


	public String getZipcode() {
		return this.zipcode;
	}

	public void setZipcode(String zipcode) {
		this.zipcode = zipcode;
	}
	
	
	public String getCompensation() {
		return this.compensation;
	}

	public void setCompensation(String compensation) {
		this.compensation = compensation;
	}


	//bi-directional many-to-one association to Clients_has_Firm
	@OneToMany(mappedBy="firm")
	public Set<Clients_has_Firm> getClientsHasFirms() {
		return this.clientsHasFirms;
	}

	public void setClientsHasFirms(Set<Clients_has_Firm> clientsHasFirms) {
		this.clientsHasFirms = clientsHasFirms;
	}
	

	//bi-directional many-to-many association to Activity
    @ManyToMany
	@JoinTable(
		name="Firm_has_Activity"
		, joinColumns={
			@JoinColumn(name="Firm_crd", referencedColumnName="crd"),
			@JoinColumn(name="Firm_idFirm", referencedColumnName="idFirm")
			}
		, inverseJoinColumns={
			@JoinColumn(name="Activity_idActivity")
			}
		)
	public Set<Activity> getActivities() {
		return this.activities;
	}

	public void setActivities(Set<Activity> activities) {
		this.activities = activities;
	}
	

	//bi-directional many-to-many association to Filling
    @ManyToMany
	@JoinTable(
		name="Firm_has_Filling"
		, joinColumns={
			@JoinColumn(name="Firm_crd", referencedColumnName="crd"),
			@JoinColumn(name="Firm_idFirm", referencedColumnName="idFirm")
			}
		, inverseJoinColumns={
			@JoinColumn(name="Filling_idFilling")
			}
		)
	public Set<Filling> getFillings() {
		return this.fillings;
	}

	public void setFillings(Set<Filling> fillings) {
		this.fillings = fillings;
	}
	

	//bi-directional many-to-one association to Firm_Address
    @ManyToOne
	@JoinColumn(name="Address_idCitState")
	public Firm_Address getFirmAddress() {
		return this.firmAddress;
	}

	public void setFirmAddress(Firm_Address firmAddress) {
		this.firmAddress = firmAddress;
	}
	

	//bi-directional many-to-one association to Firm_has_Account
	@OneToMany(mappedBy="firm")
	public Set<Firm_has_Account> getFirmHasAccounts() {
		return this.firmHasAccounts;
	}

	public void setFirmHasAccounts(Set<Firm_has_Account> firmHasAccounts) {
		this.firmHasAccounts = firmHasAccounts;
	}
	

	//bi-directional many-to-one association to Firm_has_Address
	@OneToMany(mappedBy="firm")
	public Set<Firm_has_Address> getFirmHasAddresses() {
		return this.firmHasAddresses;
	}

	public void setFirmHasAddresses(Set<Firm_has_Address> firmHasAddresses) {
		this.firmHasAddresses = firmHasAddresses;
	}
	

	//bi-directional many-to-one association to Firm_has_Assest
	@OneToMany(mappedBy="firm")
	public Set<Firm_has_Assest> getFirmHasAssests() {
		return this.firmHasAssests;
	}

	public void setFirmHasAssests(Set<Firm_has_Assest> firmHasAssests) {
		this.firmHasAssests = firmHasAssests;
	}
	

	//bi-directional many-to-one association to Firm_has_Employee
	@OneToMany(mappedBy="firm")
	public Set<Firm_has_Employee> getFirmHasEmployees() {
		return this.firmHasEmployees;
	}

	public void setFirmHasEmployees(Set<Firm_has_Employee> firmHasEmployees) {
		this.firmHasEmployees = firmHasEmployees;
	}
	

	//bi-directional many-to-one association to Firm_has_Owner
	@OneToMany(mappedBy="firm")
	public Set<Firm_has_Owner> getFirmHasOwners() {
		return this.firmHasOwners;
	}

	public void setFirmHasOwners(Set<Firm_has_Owner> firmHasOwners) {
		this.firmHasOwners = firmHasOwners;
	}
	

	//bi-directional many-to-many association to Service
	@ManyToMany(mappedBy="firms")
	public Set<Service> getServices() {
		return this.services;
	}

	public void setServices(Set<Service> services) {
		this.services = services;
	}
	

	//bi-directional many-to-one association to Email
	@OneToMany(mappedBy="firm")
	public Set<Email> getEmails() {
		return this.emails;
	}

	public void setEmails(Set<Email> emails) {
		this.emails = emails;
	}
	

	//bi-directional many-to-many association to Wrap
	@ManyToMany(mappedBy="firms")
	public Set<Wrap> getWraps() {
		return this.wraps;
	}

	public void setWraps(Set<Wrap> wraps) {
		this.wraps = wraps;
	}

	@OneToOne
	public Custodial getCustodial() {
		return custodial;
	}


	public void setCustodial(Custodial custodial) {
		this.custodial = custodial;
	}
	
	
	
}